import React, { Component } from "react";
import userContext from "./context/userContext.js";
import Main from "./Main.jsx";

export class App extends Component {
  constructor() {
    super();
    this.state = {
      userinfo: {
        name: "张三",
        age: 18,
        sex: "男",
      },
    };
  }
  render() {
    const { userinfo } = this.state;
    return (
      <div>
        <h1>app</h1>
        <userContext.Provider value={userinfo}>
          <Main></Main>
        </userContext.Provider>
      </div>
    );
  }
}

export default App;
